package cn.iocoder.yudao.module.crm.enums.customer;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * CRM 客户等级
 *
 * @author Wanwan
 */
@Getter
@AllArgsConstructor
public enum CrmCustomerProgressEnum implements IntArrayValuable {

    NEW(0, "待跟进"),
    FOLLOWED(1, "已跟进"),
    CREATE_BUSINESS(2, "创建商机"),
    CREATE_CONTRACT(3, "创建合同"),
    CONTRACT_RECEIVABLE(4, "合同回款"),
    LOSE(-1, "输单"),
    WIN(9, "赢单");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerProgressEnum::getValue).toArray();

    /**
     * 状态
     */
    private final Integer value;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
